<?php

// This is the configuration for yiic console application.
// Any writable CConsoleApplication properties can be configured here.

return array(
    'basePath' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '..',
    'name' => 'Yii Blog Demo',
    'modules' => array(
        'Core' => array(
            //Sub modules
            'modules' => array(
                'auth'
            ),
        ),
//        'gii' => array(
//            'class' => 'system.gii.GiiModule',
//            'generatorPaths' => array('Core.extensions.gii.generators'),
//            'password' => 'flexicore',
//        ),
//        'Admin' => array(
//        ),
//        'User' => array(
//        ),
//        // -------- begin listing site modules below ---------- //
        'Article' => array(
        ),
    ),
    // preloading 'log' component
    'preload' => array('log', 'core'),
    // autoloading model and component classes
    'import' => array(
        'application.models.*',
        'application.components.*',
        'Core.components.*',
    ),
    // application components
    'components' => array(
        'core' => array(
            'class' => 'Core.extensions.FlexiCore',
            'FrontendRenderer' => false,
        ),
//        'user' => array(
//            'allowAutoLogin' => true,
//        ),
//        'authManager' => array(
//            'class' => 'FAuthManager',
//        ),
        'db' => array(
           'connectionString' => 'mysql:host=localhost;dbname=vinatraders',
            'emulatePrepare' => true,
            'enableParamLogging' => true,
            'username' => 'root',
            'password' => '',
            'charset' => 'utf8',
        ),
        'errorHandler' => array(
            'class' => 'Core.extensions.base.FErrorHandler',
            //use 'site/error' action to display errors
            'errorAction' => 'site/error',
        ),
        'urlManager' => array(
//            'urlFormat'=>'path',
            'rules' => array(
                'post/<id:\d+>/<title:.*?>' => 'post/view',
                'posts/<tag:.*?>' => 'post/index',
                '<controller:\w+>/<action:\w+>' => '<controller>/<action>',
            ),
        ),
        'log' => array(
            'class' => 'CLogRouter',
            'routes' => array(
                array(
                    'class' => 'CFileLogRoute',
                    'levels' => 'error, warning, trace',
                ),
            ),
        ),
        'cache' => array(
            'class' => 'system.caching.CDbCache',
            'autoCreateCacheTable' => true,
            'connectionID' => 'db',
            'cacheTableName' => 'yii_cache',
        ),
        'mail' => array(
            'class' => 'application.modules.Core.extensions.vendors.mail.YiiMail',
            'transportType' => 'smtp',
            'transportOptions' => array(
                'host' => 'smtp.gmail.com',
                'username' => 'mailer@webflexica.com',
                'password' => 'm41l3r',
                'port' => 465,
                'encryption' => 'ssl',
            ),
            'logging' => true,
            'dryRun' => false
        ),
    ),
        // application-level parameters that can be accessed
        // using Yii::app()->params['paramName']
);